// Mongoose的一切都始于一个Schema。每个schema映射到MongoDB的集合(collection)和定义该集合(collection)中的文档的形式
const mongoose = require('mongoose')

const schema = new mongoose.Schema({ 
        name:{type : String},
        personNum:{type : String},
        moneyNum:{type : String},
        time:{type : String},
        tell:{type : String},
        image:{type : String},
        detailImg:[{
            id:{type : Number},
            imgName:{type:String},
            img:{type : String}
        }],
        nr1:{type : String},
        nr2:{type : String},
        categories:{type:mongoose.SchemaTypes.ObjectId,ref:'Category'},
})


 
module.exports = mongoose.model('Activity',schema)